import pandas as pd

df = pd.read_csv("D:\py\pythonProject\population-data\data\originalData\分省男性预期寿命数据.csv", skiprows=3,encoding="gbk")
df=df.iloc[:-2]
print(df.head())

df = df.dropna(axis=1, how='any')
df.to_csv(r"D:\py\pythonProject\population-data\data\temp\分省男性预期寿命数据.csv",encoding="gbk")